Release 10.1A: OpenEdge Development:
Programming Interfaces
Logical database names
When you connect to a database, OpenEdge automatically assigns that database a default logical name for the current OpenEdge session. The default logical name consists of the physical database name without the
.dbfile extension. For example, if you connect to a database with the physical namemydb1.db, the default logical database name is mydb1. OpenEdge uses the logical database namemydb1to resolve database references, and stores it in the compiled r-code of any procedures that you compile that reference themydb1.dbdatabase.The Logical Database Name (–
ld) connection parameter allows you to specify a logical database name other than the default.The example below establishes the logical name
firstdbfor the physical databasemydb1.dbduring the current OpenEdge session:
When you develop and compile an application to run on the
mydb1.dbdatabase, it is the logical name, not the physical name, that OpenEdge stores in the r-code. You must use the logical namefirstdbin your procedures (.p) to reference themydb1.dbdatabase.Logical database names allow you to change physical databases without recompiling an application. To run a compiled application on a new physical database without recompiling, the new database must have identical structure and time stamp or Cyclic Redundancy Check (CRC) values for the tables accessed by the application and must be connected with the same logical name (or alias) used to compile the application:
The example above establishes the logical name
Note: OpenEdge does not allow you to run the OpenEdge Data Administration tool or character Data Dictionary against a database connected with the logical namefirstdbfor a new physical databasemydb2.db.DICTDB.A database connection fails if the logical database name of the database that you connect to has the same logical name as an already connected database of the same database type (OpenEdge, ORACLE, etc.). If you try to do this, OpenEdge assumes that database is already connected and ignores the request.
For information about the characters allowed in the logical name, see the OpenEdge Deployment: Startup Command and Parameter Reference .
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |